home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / grafik / converter / mpimage42 / include / libraries / mpimage.h < prev   
Encoding:
C/C++ Source or Header  |  1996-07-16  |  3.2 KB  |  115 lines

  1. #ifndef LIBRARIES_MPIMAGE_H
  2. #define LIBRARIES_MPIMAGE_H
  3.  
  4. /* mark@topic.demon.co.uk */
  5. /* mpaddock@cix.compulink.co.uk */
  6.  
  7. /* $VER: MPImage.h 4.0 (5.7.95)
  8. */
  9.  
  10. #include <exec/types.h>
  11.  
  12. /* Load Image stuff */
  13. struct MPImage {
  14.     struct BitMap *BitMap;
  15.     struct E_EBitMap *EGS_BitMap;
  16.     UBYTE *Red;
  17.     UBYTE *Green;
  18.     UBYTE *Blue;
  19.     UWORD Width;
  20.     UWORD Height;
  21.     Object *Object;
  22.     BOOL GreyScale;
  23. };
  24.  
  25. /* Default is to remap to screen palette and return a bitmap in BitMap */
  26. /* Only way to free is to call FreeMPImageBitMap */
  27.  
  28. /* return E_EBitMap rather than BitMap */
  29. /* overrides MPIF_RGB */
  30. #define MPIF_EGS                 (1<<0)
  31.  
  32. /* You are free to zero BitMap/EGS_BitMap before calling FreeMPImageBitMap */
  33. /* You must then call FreeBitMap()/E_DisposeBitMap() yourself */
  34. /* Ignored for MPIF_RGB */
  35. /* If screen supplied then clone is screen depth deep if possible */
  36. #define MPIF_CLONEBITMAP    (1<<1)
  37.  
  38. /* Don't remap to the current screen colors */
  39. /* Ignored for MPIF_EGS/RGB */
  40. /* Returns error if 24 bit input */
  41. #define MPIF_NOREMAP            (1<<2)
  42.  
  43. /* return Red, Green, Blue instead of BitMap */
  44. #define MPIF_RGB                (1<<3)
  45.  
  46. /* return Red, Green, Blue instead of BitMap */
  47. /* If image is greyscale then Red, Green and Blue will be the same */
  48. /* and GreyScale will be TRUE */
  49. #define MPIF_GREY                (1<<4)
  50.  
  51. /* As MPIF_GREY but force the input to be remapped to GreyScale */
  52. #define MPIF_FORCEGREY        (1<<5)
  53.  
  54. /* Save Image stuff */
  55. /* CAMG mode - data is modeid */
  56. /* If not supplied, or INVALID_ID supplied then internally generated */
  57. #define MPIS_MODE        (TAG_USER + 1)
  58.  
  59. /* Save Format - data is (char *) */
  60. /* If not supplied or NULL then save BW16 */
  61. #define MPIS_FORMAT    (TAG_USER + 2)
  62. /* 16 colour grey scale */
  63. #define MPI_BW16        "BW16"
  64. /* 256 colour grey scale */
  65. #define MPI_BW256        "BW256"
  66. /* HAM 6 fixed (internal) palette */
  67. #define MPI_HAM6        "HAM6"
  68. /* HAM 8 fixed (internal) palette */
  69. #define MPI_HAM8        "HAM8"
  70. /* 24 bit ILBM */
  71. #define MPI_ILBM24    "ILBM24"
  72. /* P6 (or P5 if all planes are the same) PPM format */
  73. #define MPI_PPM        "PPM"
  74. /* HAM 6 generate best palette */
  75. #define MPI_HAM6P        "HAM6P"
  76. /* HAM 8 generate best palette */
  77. #define MPI_HAM8P        "HAM8P"
  78. /* COLOUR generate palette */
  79. #define MPI_COLOUR    "COLOUR"
  80. /* EHB generate palette */
  81. #define MPI_EHB        "EHB"
  82. /* JPEG (requires env:mpimage/cjpeg to be set e.g. 'cjpeg "%s" "%s"') */
  83. #define MPI_JPEG        "JPEG"
  84. /* PNG (requires env:mpimage/pnmtopng to be set e.g. 'pnmtopng "%s" >"%s"') */
  85. #define MPI_PNG        "PNG"
  86. /* DCTV3 (requires dctv.library) */
  87. #define MPI_DCTV3        "DCTV3"
  88. /* DCTV4 (requires dctv.library) */
  89. #define MPI_DCTV4        "DCTV4"
  90.  
  91. /* Filename of palette to use - data is (char *) */
  92. /* Overrides internal and generated palettes */
  93. /* Can be NULL */
  94. #define MPIS_PALETTE    (TAG_USER + 3)
  95.  
  96. /* Number of colours to generate/use from palette - data is ULONG */
  97. /* Only used for COLOUR */
  98. /* If not supplied defaults to number of colours in palette (if supplied) */
  99. /* otherwise 16 */
  100. /* If > colours in palette then ignored */
  101. /* max 256, min 2 */
  102. #define MPIS_COLOURS    (TAG_USER + 4)
  103.  
  104. /* Use 12 bit colour palette for COLOUR/EHB */
  105. #define MPIS_12BIT    (TAG_USER + 5)
  106.  
  107. /* Mode name data is char *, overridden by MPIS_MODE - invalid names ignored */
  108. #define MPIS_MODENAME    (TAG_USER + 6)
  109.  
  110. /* Flags for SetMPImageScreen() */
  111. /* Use progress requesters */
  112. #define MPIF_PROGRESS    1
  113.  
  114. #endif
  115.